﻿@model IEnumerable<Product>
@{
    ViewBag.Title = "Global Advantage - Home";
    var videos = Model.OfType<Video>();
    var modules = Model.OfType<Module>();
}
<script type="text/javascript">
    $(function ()
    {
        $("#tabs").tabs().show();
    });
</script>
<div class="homeMain">
    <p>
        Global Advantage provides training modules and videos for individuals and businesses
    </p>
    <p>
        To get started, browse our @Html.ActionLink("list of videos", "Videos") or @Html.ActionLink("list of modules", "Modules"). 
    </p>
</div>
<div class="homeRight">
    <h2>Featured Training</h2>
    <div id="tabs">
	    <ul>
		    <li><a href="#tabs-1">Videos</a></li>
		    <li><a href="#tabs-2">Modules</a></li>
	    </ul>
	    <div id="tabs-1">
		    <ul class="featured">
                @foreach (var v in videos)
                {
                    <li>
                        @v.LinkToItem(Html, v.Title) - @Html.Raw(v.Teaser)
                    </li>
                }
            </ul>
	    </div>
	    <div id="tabs-2">
		    <ul class="featured">
                @foreach (var m in modules)
                {
                    <li>
                        @m.LinkToItem(Html, m.Title) - @Html.Raw(m.Teaser)
                    </li>
                }
            </ul>
	    </div>
    </div>
    <div id="stocks">
        <h3>Stock Prices</h3>
        @Html.Partial("Stocks")
    </div>
</div>